package com.noah.common.enums;

import com.noah.common.core.IntArrayValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 终端类型
 *
 * @author noah
 * 2023/9/5 09:44
 */
@Getter
@AllArgsConstructor
public enum TerminalTypeEnum implements IntArrayValue {
    WECHAT_MINI_PROGRAM(10, "微信小程序"),
    WECHAT_WAP(11, "微信公众号"),
    H5(20, "H5 网页"),
    IOS(31, "苹果 App"),
    ANDROID(32, "安卓 App");
    /**
     * 终端类型
     */
    private final Integer terminalType;
    /**
     * 终端类型名称
     */
    private final String name;

    private static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TerminalTypeEnum::getTerminalType).toArray();

    @Override
    public int[] array() {
        return ARRAYS;
    }
}
